package com.hancher.plugins;

import android.os.Bundle;
import android.os.Handler;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;

import com.hancher.plugin.R;
import com.hancher.plugins.hrnumberaddsub.HrNumberKeyboardPopup2;
import com.lxj.xpopup.XPopup;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_main);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                new XPopup.Builder(MainActivity.this)
//                    .hasStatusBarShadow(true)
//                    .hasNavigationBar(true)
                        // 是否与目标水平居中对齐
                        .isCenterHorizontal(true)
                        .isDestroyOnDismiss(true) //对于只使用一次的弹窗，推荐设置这个
                        .popupWidth(200)
                        .popupHeight(400)
                        .asCustom(new HrNumberKeyboardPopup2(MainActivity.this, new HrNumberKeyboardPopup2.OnViewClickListener() {
                            @Override
                            public void afterNumberChanged(String s) {

                            }

                            @Override
                            public void onComplete(double lastNum) {
                            }
                        }))
                        .show();

            }
        }, 5000);
    }
}